{% extends 'layout/base.html' %}

{% block content %}
<div class="row mt-5">
    <div class="col-lg-3">
        {% set active_nav = 'password_complexity' %}
        {% include 'config/includes/sidebar.html' %}
    </div>
    <div class="col-lg-5">
        <h4>Password Complexity</h4>
        <form action="{{ url_for('config.password_complexity_save') }}" method="post">
            <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">

            <div class="form-group row">
                <div class="col">
                    <label for="pwd_min_length">Minimum Length</label>
                </div>
                <div class="col">
                    <input type="number" class="form-control text-right" name="pwd_min_length" id="pwd_min_length" value="{{ setting_get('pwd_min_length', '12') }}" placeholder="" required>
                </div>
            </div>

            <div class="form-group row">
                <div class="col">
                    <label for="pwd_min_lower">Minimum Lower</label>
                </div>
                <div class="col">
                    <input type="number" class="form-control text-right" name="pwd_min_lower" id="pwd_min_lower" value="{{ setting_get('pwd_min_lower', '2') }}" placeholder="" required>
                </div>
            </div>

            <div class="form-group row">
                <div class="col">
                    <label for="pwd_min_upper">Minimum Upper</label>
                </div>
                <div class="col">
                    <input type="number" class="form-control text-right" name="pwd_min_upper" id="pwd_min_upper" value="{{ setting_get('pwd_min_upper', '2') }}" placeholder="" required>
                </div>
            </div>

            <div class="form-group row">
                <div class="col">
                    <label for="pwd_min_digits">Minimum Digits</label>
                </div>
                <div class="col">
                    <input type="number" class="form-control text-right" name="pwd_min_digits" id="pwd_min_digits" value="{{ setting_get('pwd_min_digits', '2') }}" placeholder="" required>
                </div>
            </div>

            <div class="form-group row">
                <div class="col">
                    <label for="pwd_min_special">Minimum Special</label>
                </div>
                <div class="col">
                    <input type="number" class="form-control text-right" name="pwd_min_special" id="pwd_min_special" value="{{ setting_get('pwd_min_special', '2') }}" placeholder="" required>
                </div>
            </div>

            <div class="form-group">
                <button type="submit" class="btn btn-block btn-primary">save</button>
            </div>
        </form>
    </div>
    <div class="col-lg"></div>
</div>
{% endblock %}